<template>
  <div class="home">
    <h1>LomoFramePlayer 组件演示</h1>
    <div class="player-types">
      <el-card class="player-card" shadow="hover" @click="goToPlayer('lomo')">
        <template #header>
          <div class="card-header">
            <span>Lomo帧播放器</span>
          </div>
        </template>
        <div class="card-content">
          <p>基于Canvas实现的高性能帧动画播放器</p>
        </div>
      </el-card>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goToPlayer = (type) => {
  router.push(`/player?type=${type}`)
}
</script>

<style scoped>
.home {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  margin-bottom: 30px;
  color: #409EFF;
}

.player-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.player-card {
  cursor: pointer;
  transition: transform 0.3s;
}

.player-card:hover {
  transform: translateY(-5px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-content {
  padding: 10px 0;
}
</style>